package com.zhanqiao.Utils;

import com.mchange.v2.c3p0.ComboPooledDataSource;

import javax.sql.DataSource;
//这是一个获取单例DataSource对象的工具类
public class GetDataSourceUtil {
    private static DataSource ds ;
    public static DataSource getDataSource(){
        if(ds==null){
            ds = new ComboPooledDataSource();
           return ds;
        }
        return ds;
    }
}
